package com.heima.utils.thread;

import com.heima.model.user.pojos.ApUser;
import com.heima.model.wemedia.pojos.WmUser;

public class AppThreadLocalUtil {

    public static final ThreadLocal<ApUser> WM_USER_THREAD_LOCAL = new ThreadLocal<>();

    //    存入当前用户
    public static void setUser(ApUser apUser) {
        WM_USER_THREAD_LOCAL.set(apUser);
    }

    //    得到当前用户id
    public static ApUser getUser() {
        return WM_USER_THREAD_LOCAL.get();
    }

    //    删除用户
    public static void remove() {
        WM_USER_THREAD_LOCAL.remove();
    }

}
